<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="my" uri="/my-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'booksOnLoan.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	
	<link rel="stylesheet" type="text/css" href="images/main.css">
	<script type="text/javascript" src="images/jquery.js"></script>
	<script type="text/javascript">
		$(function(){
			$("tr").mouseleave(function(){
				$(this).css("background-color","#fefefe");
				$("thead tr").css("background-color","#F3F8F7");
			});
			$("tr").mouseover(function(){
				$(this).css("background-color","#E9E9E4");
				$("thead tr").css("background-color","#F3F8F7");
			});
		});
	</script>


  </head>
  
  <body>
    <div class="mainBox">
      <table class="table_list" cellpadding="3" cellspacing="1" border="0">
    	<thead><tr style="background:#F3F8F7"><td>序号</td><td>资料编号</td><td>资料名称</td><td>类型</td><td>作者</td><td>出版社</td><td>借阅日期</td><td>借阅人</td><td colspan="3">操作</td></tr></thead>

    	<s:iterator value="#session.SESSION_LOAN_LIST" var="each" status="st">
    		<tr style="background:#fefefe">
    		<td><s:property value="#st.index + 1"/></td>
    		<td><s:property value="#each.borrowBook.callNo"/></td>
    		<td><a href="queryBook?op=info&id=<s:property value="#each.borrowBook.bookId"/>"><s:property value="#each.borrowBook.bookName"/></a></td>
    		<td><s:property value="#each.borrowBook.bookType.bookTypeName"/></td>
    		<td><s:property value="#each.borrowBook.bookAuthor"/></td>
    		<td><s:property value="#each.borrowBook.bookPublisher"/></td>
    		<td><s:property value="#each.borrowTime"/></td>
    		<td><s:property value="#each.borrowManager.manName"/></td>
    		<td><a href="queryBook?op=detail&id=<s:property value="#each.borrowBook.bookId"/>">修改</a></td>
    		<td><a href="returnBook?from=loan&bid=<s:property value="#each.borrowBook.bookId"/>">归还</a></td>
    		</tr>
    	</s:iterator>
    	
    		<tr style="background:#fefefe"><td colspan="99" align="right">
<my:page pageSize="${sessionScope.SESSION_LOAN_PAGESIZE }"
						pageNo="${sessionScope.SESSION_LOAN_PAGENO }" url="bookOnLoan"
						count="${sessionScope.SESSION_LOAN_COUNT }"
						wd="${sessionScope.SESSION_WD }"></my:page>
				</td></tr>
    	</table>
    
    </div>
  </body>
</html>
